Skip to content

Conversation

@tleyden
Copy link
Contributor

@tleyden tleyden commented Nov 20, 2025

This PR documents the parameters for the /api/daily_papers.

This is just a first quick pass. Let me know if you'll take a PR to improve these docs, and any clean-up or edits you'd like me to do.

Thanks @AK391 for pointing me to these docs.

Add params documentation for /api/daily_papers
Copy link
Contributor

@merveenoyan merveenoyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot!

docs/hub/api.md Outdated

Other keywords that are supported:

1. `limit` - the number of pages returned
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as in length of the paper or number of papers returned?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, yeah that's what it should say.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated it

docs/hub/api.md Outdated
1. `limit` - the number of pages returned
2. `p` - the page number, for paging through results
3. `submitter` - to filter by summitter
4. `date`, `week`, `month` - for filtering by date range
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. `date`, `week`, `month` - for filtering by date range
4. `date`, `week`, `month` - for filtering by date range

of the paper release dates?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't create the API, and it's not clear to me from the openapi docs. It could be either the paper release date, or the day it was featured on Daily Papers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to DeepWiki

The date parameter refers to when the paper was included in the daily papers on the Hub, not when it was written or originally submitted to arXiv. hf_api.py:1527-1528

This is confirmed by the PaperInfo dataclass, which has two distinct date fields:

published_at: The date the paper was published (on arXiv) hf_api.py:1513-1514
submitted_at: The date the paper appeared in daily papers on the Hub hf_api.py:1527-1528|

I will update it according to that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm it's the publishedAt property (internal link). Somewhat related PR: #1878.

docs/hub/api.md Outdated
2. `p` - the page number, for paging through results
3. `submitter` - to filter by summitter
4. `date`, `week`, `month` - for filtering by date range
5. `sort` - to specify how results are sorted.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can they be sorted? by date or?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the openapi docs:

sortCopy link to sort
enum
default: 
"publishedAt"
publishedAt
trending

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this as well

docs/hub/api.md Outdated

Search the daily papers by keyword:

1. `q` - the keyword to search
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems standalone so no need to number I think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

tleyden and others added 4 commits November 20, 2025 16:40
Co-authored-by: Merve Noyan <merve@huggingface.co>
Clarify the default sorting behavior and options for the API.
Clarified filtering parameters for date and sorting in API documentation.
Copy link
Contributor

@merveenoyan merveenoyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but would like @AK391 to review too just in case

@merveenoyan merveenoyan requested a review from AK391 November 21, 2025 11:00
tleyden and others added 2 commits November 21, 2025 14:05
Co-authored-by: Merve Noyan <merve@huggingface.co>
Co-authored-by: Merve Noyan <merve@huggingface.co>
@tleyden
Copy link
Contributor Author

tleyden commented Nov 25, 2025

Bump on this. Any update?

Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. We can optionally provide examples of weekly and monthly filters, see this comment for reference. But I'd suggest we merge this now and iterate in a new PR.

@tleyden
Copy link
Contributor Author

tleyden commented Nov 26, 2025

Looks good to me. We can optionally provide examples of weekly and monthly filters, see this comment for reference. But I'd suggest we merge this now and iterate in a new PR.

Good to know about! Yes makes sense, I might be able to open up a follow-up PR.

I agree, merge this so it doesn't get forgotten about, since currently the docs are pretty bare.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@pcuenca pcuenca merged commit 4910c3c into huggingface:main Nov 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants